{template '_header'}

<div class="page-header">
	当前位置：<span class="text-primary">{if !empty($item['id'])}编辑{else}添加{/if}行业{if !empty($item['id'])}({$item['name']}){/if}</span>
</div>

<div class="page-content">
	<div class="page-sub-toolbar">
        <span class=''>
            {ifp 'sgoods.owneradd'}
				<a class="btn btn-primary btn-sm" href="{php echo webUrl('sgoods/owneradd', array('id'=>$id))}">添加新创业者</a>
			{/if}
			<a class="btn btn-default  btn-sm" href="{php echo webUrl('sgoods/owner', array('id'=>$id))}">返回列表</a>
        </span>
	</div>

<form id="setform"  {ifp 'sgoods.owneradd'}action="" method="post"{/if} class="form-horizontal form-validate">

<input type="hidden" name="id" value="{$id}" />
<input type="hidden" name="ownerid" value="{$item['id']}" />

<div class="tabs-container">
	<div class="tab-content ">
		<div class="tab-pane active" id="tab_basic">

			<div class="form-group">
				<label class="col-sm-2 control-label must">创业者</label>
				<div class="col-sm-8">
					{ifp 'sgoods.owneredit'}
						{php echo tpl_selector('uid',array('key'=>'id','text'=>'realname', 'thumb'=>'avatar','multi'=>0,'placeholder'=>'昵称/姓名/手机号','buttontext'=>'选择创业者', 'items'=>$ouid, 'url'=>webUrl('user/query') ))}
					{else}
					<div class="form-control-static">
						{$item['uid']}
					</div>
					{/if}
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label must">占有比例</label>
				<div class="col-sm-8">
					{ifp 'sgoods.owneredit'}
					<input type="text" class="form-control" name="ratio" value="{$item['ratio']}" data-rule-required="true"/>
					{else}
					<div class="form-control-static">
						{$item['ratio']}
					</div>
					{/if}
				</div>
			</div>
		</div>
	</div>
</div>

{ifp 'sgoods.owneredit'}
<div class="form-group">
	<label class="col-sm-2 control-label"></label>
	<div class="col-sm-9 col-xs-12">
		<input type="submit"  value="提交" class="btn btn-primary" />
	</div>
</div>
{/if}

</form>
</div>
{template '_footer'}